
package com.gx.common.enums;


/**
 * @Author Liu-pj
 * @Date 2023/3/7 14:47
 * @Desc 通用错误信息
 **/
public enum ResultCodeEnum {
    /**
     * 通用错误信息
     */
    SUCCESS("成功", 200),
    UNKNOWN_ERROR("执行过程异常，请重试。", 500),
    PARAMS_ERROR("非法参数", 101),
    OBJECT_NULL("对象为空", 102),
    QUERY_NULL("查询结果为空", 103),
    REQUEST_NULL("请求参数为空", 104);

    private final String message;
    private final Integer code;

    ResultCodeEnum(String message, Integer code) {
        this.message = message;
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public Integer getCode() {
        return code;
    }
}
